<?php
/**
 * Created by PhpStorm.
 * User: 彭奇
 * Date: 2018/9/27
 * Time: 22:45
 */
$names=$_GET["names"];
$pass=$_GET["pass"];
$id=$_GET["id"];
try{
    $pdo = new PDO("mysql:dbname=test;host=127.0.0.1","root","");
}catch (PDOException $e){
    echo "连接失败";
    var_dump($e);
}
$delSQL = "UPDATE pq_user SET `name` = '{$names}',`pass` = '{$pass}'WHERE  id = {$id} ";
$res = $pdo -> exec($delSQL);
if ($res > 0){
    echo "修改成功";
    echo '<meta http-equiv="refresh" content="1;url=check.php">';//修改

}else {
    echo "修改失败";
    var_dump($pdo->errorInfo());
}
